package com.easidea.tim.dao.system.permission;

import java.util.List;

import org.hibernate.Query;
import org.springside.core.dao.extend.HibernateEntityExtendDao;

import com.easidea.tim.entity.system.permission.Role;

public class RoleDao extends HibernateEntityExtendDao<Role> {

	 @SuppressWarnings("unchecked")
public boolean checkDelRole(long roleId) {
		String queryString = " select staff_id from tim_permission_staff_role_rel where role_id =" +roleId;
		Query q = this.getSession().createSQLQuery(queryString);
		List ls = q.list();
		if(ls != null && ls.size() >0){
			return false;
			
		}
		return true;
}
}
